A system having one or more processors may include debug resources to facilitate debugging of the system. For example, a system on a chip (SOC) may include debug resources integrated on the chip to facilitate debugging. The debug resources may include a trace source that provides a trace output of code execution and/or data in a processor for monitoring the operation of the processor. An operator may connect an external debugger to the system to control the trace source and view the trace output of the trace source. The external debugger can program the trace source through a debug access port (DAP) in the system and receive the trace output of the trace source through a trace port. For example, the external debugger can program the trace source to trace a particular program routine executed by the processor to debug the program routine.
Buffers are typically used to store data produced by a trace source. However, the bandwidth of data produced by a trace source may vary greatly during tracing operations. A large peak of trace data may overflow a buffer, causing loss of trace data. Proposed solutions have included stalling the processor being traced, or halting data trace operations.